package syntax;

//import com.modeliosoft.modelio.javadesigner.annotations.objid;

//@objid ("004dd47e-bdc4-10d9-ac48-082e5f2773a2")
public class NamedObject  implements Comparable<NamedObject>, Cloneable{
    //@objid ("00203898-d15a-10da-ac48-082e5f2773a2")
    private String name;

    public String getName() {
        return name;
    }

    @Override
    protected Object clone(){
        
        String localName = new String(this.name);
        return new NamedObject(localName);
    }

    public void setName(String name) {
        this.name = name;
    }

    public NamedObject(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return name;
    }

    @Override
    public int compareTo(NamedObject t) {
        return name.compareTo(t.getName());
    }    
}
